// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINFRM_H__4F80F080_8C3E_4B36_908E_B37516596D64__INCLUDED_)
#define AFX_MAINFRM_H__4F80F080_8C3E_4B36_908E_B37516596D64__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ClientSocket.h"

class CMainFrame : public CFrameWnd
{
	
protected: // create from serialization only
	CMainFrame();
	DECLARE_DYNCREATE(CMainFrame)

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMainFrame)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

public:  // control bar embedded members
	CStatusBar  m_wndStatusBar;
	CToolBar    m_wndToolBar;
	CReBar      m_wndReBar;
	CDialogBar  m_wndDlgBar;

	BYTE ZongZhao ;
	BYTE SendBuff[256];
	CClientSocket m_ClientSocket;
	NET_RECV_QUEUE NetRecvQueue;

	CDWordArray m_IPArr   ;
	DWORD  m_iphostsource ; // same IP in host format
	struct in_addr In_Addr[6];

	void GetLocalIP();
	void Socket_SendData(BYTE *pData, int nLen);
// Generated message map functions
protected:
	//{{AFX_MSG(CMainFrame)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnConnect();
	afx_msg void OnBtStartdt();
	afx_msg void OnBtDownCmd();
	afx_msg void OnClearRichedit();
	afx_msg void OnDisplayPause();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnSelchangeComboAsdu();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MAINFRM_H__4F80F080_8C3E_4B36_908E_B37516596D64__INCLUDED_)
